<template>
    <div id="root" @click="hideMenu">
        <div class="mask"></div>
        <ul>
            <li>
                <router-link to="/home">首页</router-link>
            </li>
            <li>
                <router-link to="/classify">分类</router-link>
            </li>
            <li>
                <router-link to="/recommend">推荐</router-link>
            </li>
            <li>
                <router-link to="/set">设置</router-link>
            </li>
        </ul>
    </div>
</template>

<script>
    export default {
        name:'sideMenu',
        data:function(){
            return {
                
            }
        },
        methods:{
            hideMenu:function(){
                this.$emit('hidemenu');
            }
        }
    }
</script>

<style scoped>
#root{
    width:100%;
    height:100%;
    position:absolute;
    top:0;
    padding-top: 64px;
}
.mask{
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: black;
    opacity: 0.5;
}
ul{
    width: 70%; 
    height: 100%;
    background-color:black;
    margin: 0;
    z-index:100;
    position:relative;
}

ul li{
    list-style: none;
    line-height: 64px;
    border-bottom: 1px solid white;
}
li a{
    color: white;
    font-size: 30px;
    display:inline-block;
    width:100%;
}
</style>